foil (someone's) attempt

Translations
faire échouer la tentative de quelqu’un
Definitions
To thwart or prevent someone from successfully achieving their goal or intention.